@space: 24px;
@border_light: #d9d9d9;
@border_dark: #868686;
@import '~@/pages/global.less';

.modalDefault() {
  :global {
    .ant-modal-header {
      padding-top: 18px;
      padding-bottom: 0;
      border-bottom: 0;
    }

    .ant-modal-body {
      padding: 0;
    }

    .ant-modal-footer {
      padding: 8px 12px !important;
      padding-top: 0;
      border-top: 0 !important;
    }

    .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
      margin-left: 16px;
    }
  }
}

.modal {
  .modalDefault();

  .content {
    display: flex;
    flex: 1;
    flex-direction: row;
    height: 304px;
    overflow: hidden;
    border-bottom: 1px solid var(--bd-a20);

    .right {
      display: flex;
      flex-direction: column;
      width: 160px;
      padding: 2px;
      overflow: hidden;
      border-right: 1px solid var(--bd-a20);

      .right_title {
        height: 30px;
        padding: 0 14px;
        color: var(--font-a40);
        font-size: 12px;
        line-height: 30px;
      }

      .right_box {
        flex: 1;
        overflow-y: auto;

        .right_label {
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          height: 26px;
          margin-top: 1px;
          padding: 0 14px;
          color: var(--font-a60);
          font-size: 14px;
          line-height: 26px;
          border-radius: 3px;
        }

        .rightIcon {
          font-size: 12px;
          line-height: 29px;
        }

        .active {
          color: var(--ant-cus-font_active);
          background: var(--bd-primary);
        }
      }
    }

    .left {
      flex: 1;
      min-width: 100px;
      padding: 2px;
      overflow: hidden;
      .left_title {
        height: 30px;
        padding: 0 14px;
        color: var(--font-a40);
        font-size: 12px;
        line-height: 30px;
      }

      .rangePicker {
        width: 240px;
        margin: 0 12px;
      }

      .left_content {
        display: flex;
        flex-direction: column;
        height: 270px;
        padding: 0 12px;
        overflow: hidden;
        .radio_box {
          overflow-y: auto;
        }
      }
    }
  }

  .modal_body {
    display: flex;
    width: 100%;
    height: 328px;
    overflow: hidden;
    border: 1px solid @border_light;
    border-radius: 4px;
  }

  .title {
    display: flex;
    align-items: center;

    .iconText {
      padding-left: 8px;
      color: var(--font);
      font-weight: 500;
      font-size: 18px;
      font-family: 'PingFang SC';
      font-style: normal;
    }

    img {
      width: 30px;
      height: 30px;
    }
  }

  :global {
    .ant-input-affix-wrapper {
      width: 240px !important;
      margin-bottom: 6px;
    }

    .ant-checkbox-wrapper {
      display: flex !important;
      margin: 3px 0 !important;
    }

    .ant-space-align-center {
      align-items: flex-start !important;
      height: 40px;
    }

    .ant-btn-text:hover {
      background: transparent !important;
    }

    .ant-btn-sm {
      height: 30px !important;
    }

    .ant-modal-footer .ant-btn {
      width: 40px;
      height: 24px;
      padding: 0;
      font-size: 12px;
    }
  }
}

:global {
  .ant-picker-range-arrow {
    display: none !important;
  }

  .ant-picker-panel-container {
    position: relative;
    top: -8px;
    left: -10px;
    // transform-origin: left top;
    // transform: scale(91%, 77%);
    // background: #222629 !important;
    // box-shadow: none !important;

    .ant-picker-month-panel {
      width: 260px !important;

      .ant-picker-body {
        padding: 0 !important;
      }

      .ant-picker-content {
        width: 260px !important;
        height: 190px !important;

        .ant-picker-cell-inner {
          font-size: 12px;
        }
      }
    }
  }
}

html[data-type-color='dark'] {
  .modal {
    :global {
      .ant-modal-header,
      .ant-modal-content {
        overflow: hidden;
        border-radius: 5px;
      }
    }

    .modalDefault();

    .modal_body {
      border-color: @border_dark;

      .treebox {
        border-color: @border_dark;
      }
    }

    .modelOverWrite();
  }
}
